package com.maoxx.stuchoosemssbv_service.mapper;

import com.maoxx.stuchoosemssbv_service.entity.SCTInfo;
import com.maoxx.stuchoosemssbv_service.entity.StudentCourseTeacher;
import org.apache.ibatis.annotations.*;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@Mapper
public interface StudentCourseTeacherMapper {

    @Select("SELECT * FROM sct WHERE sid = #{sct.sid} AND cid = #{sct.cid} AND tid = #{sct.tid} AND term = #{sct.term}")
    public List<StudentCourseTeacher> findBySCT(@Param("sct") StudentCourseTeacher studentCourseTeacher);

    @Delete("DELETE FROM sct WHERE sid = #{sct.sid} AND tid = #{sct.tid} AND cid = #{sct.cid}")
    boolean deleteBySCT(@Param("sct") StudentCourseTeacher sct);


    @Insert("INSERT INTO sct (sid, cid, tid, term) VALUES (#{s.sid}, #{s.cid}, #{s.tid}, #{s.term})")
    public boolean insert(@Param("s")StudentCourseTeacher studentCourseTeacher);

}
